package com.salelogistics.basic.service.impl;

import java.util.List;
import com.salelogistics.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.salelogistics.basic.mapper.BasProjectMapper;
import com.salelogistics.basic.domain.BasProject;
import com.salelogistics.basic.service.IBasProjectService;

/**
 * 项目基本信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-07-21
 */
@Service
public class BasProjectServiceImpl implements IBasProjectService 
{
    @Autowired
    private BasProjectMapper basProjectMapper;

    /**
     * 查询项目基本信息
     * 
     * @param projectId 项目基本信息主键
     * @return 项目基本信息
     */
    @Override
    public BasProject selectBasProjectByProjectId(Long projectId)
    {
        return basProjectMapper.selectBasProjectByProjectId(projectId);
    }

    /**
     * 查询项目基本信息列表
     * 
     * @param basProject 项目基本信息
     * @return 项目基本信息
     */
    @Override
    public List<BasProject> selectBasProjectList(BasProject basProject)
    {
        return basProjectMapper.selectBasProjectList(basProject);
    }

    /**
     * 新增项目基本信息
     * 
     * @param basProject 项目基本信息
     * @return 结果
     */
    @Override
    public int insertBasProject(BasProject basProject)
    {
        basProject.setCreateTime(DateUtils.getNowDate());
        return basProjectMapper.insertBasProject(basProject);
    }

    /**
     * 修改项目基本信息
     * 
     * @param basProject 项目基本信息
     * @return 结果
     */
    @Override
    public int updateBasProject(BasProject basProject)
    {
        return basProjectMapper.updateBasProject(basProject);
    }

    /**
     * 批量删除项目基本信息
     * 
     * @param projectIds 需要删除的项目基本信息主键
     * @return 结果
     */
    @Override
    public int deleteBasProjectByProjectIds(Long[] projectIds)
    {
        return basProjectMapper.deleteBasProjectByProjectIds(projectIds);
    }

    /**
     * 删除项目基本信息信息
     * 
     * @param projectId 项目基本信息主键
     * @return 结果
     */
    @Override
    public int deleteBasProjectByProjectId(Long projectId)
    {
        return basProjectMapper.deleteBasProjectByProjectId(projectId);
    }
}
